<?php
/**
 * Copyright (C) 2013  Artur Tolstenco
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

class Agenziaentrate_Bootstrap extends Zend_Application_Module_Bootstrap {
	const AGENZIAENTRATE_DATA_DB = 'agenziaentrate';

	protected function _initDB() {
		$conf = new Zend_Config_Ini(dirname(__FILE__).'/configs/config.ini');
		$db = Zend_Db::factory($conf->resources->db);
		Zend_Registry::set(self::AGENZIAENTRATE_DATA_DB, $db);
	}


	/**
	 * Adds factories and  mappers as resource type, enabling it auto-loading
	 */
	protected function _initResourceLoader() {
		// 		$this->_resourceLoader->addResourceType('builder', 'models/Builder', 'Builder');
		$this->_resourceLoader->addResourceType('mapper', 'models/Mapper', 'Mapper');
		// 		$this->_resourceLoader->addResourceType('request', 'models/Request', 'Request');
	}
}
